home *** CD-ROM | disk | FTP | other *** search
- From: "john (j.d.) hickin" <hickin@bnr.ca>
- Message-ID: <4k1s4j$jk0@bmtlh10.bnr.ca>
- X-Original-Date: Fri, 5 Apr 1996 01:13:55 +0000
- Path: in2.uu.net!bounce-back
- Date: 05 Apr 96 03:34:03 GMT
- Approved: fjh@cs.mu.oz.au
- Subject: Re: string::npos is unhandy and dangerous
- Newsgroups: comp.std.c++
- Organization: Bell Northern Research
- X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715)
- References: <news:4k06dh$kni@penguin.doc.ic.ac.uk>
- X-Url: news:4k06dh$kni@penguin.doc.ic.ac.uk
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMWSU9OEDnX0m9pzZAQGGGgF+PQpF+RgwEu0spEg1GtvNbemO3HatA78g
- OTao4h6iWK1aq62O7NAj6N5xLVJomaMM
- =dV4U
-
- The basic problem has been already been noted raised by Mr. Kanze. Because
- the basic_string contains the following declaration:
-
- static const size_type npos = -1;
-
- it is evident that there is a constraint that size_type must be something thay
- can be constructed from an integral type. I can't quite recall the wording of
- the original post but it was made clear that size_type cannot be arbitrary.
-
- --
- John Hickin Nortel Technology, Montreal, Quebec
- (514) 765-7924 hickin@nortel.ca
- ---
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-